package com.sys.basics.controller;

import lombok.extern.slf4j.Slf4j;
import com.sys.basics.config.jsonRes.JsonResult;
import com.sys.basics.config.jsonRes.PageParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import com.sys.basics.entity.SysUserRoleLk;
import com.sys.basics.service.SysUserRoleLkService;
import io.swagger.annotations.*;
import javax.validation.Valid;
import javax.validation.constraints.*;

/**
 * @author: ares
 * @date: 2021-10-08
 * @description: 用户角色关联表 前端控制器
 */
@Validated
@Slf4j
@Api(tags = "用户角色关联表")
@RestController
@RequestMapping("/basics/sysUserRoleLk")
public class SysUserRoleLkController extends AbstractController<SysUserRoleLkService, SysUserRoleLk> {

	@Autowired
	SysUserRoleLkService sysUserRoleLkService;

	/**
	 * @author: ares
	 * @date: 2021-10-08 12:06:48
     * @description: demo get
	 * @param p1
	 * @param p2
	 * @return JsonResult<SysUserRoleLk>
	 */
	@ApiOperation("demo GET")
	@ApiImplicitParams({
	        @ApiImplicitParam(name = "p1", value = "参数1", paramType = "query"),
	        @ApiImplicitParam(name = "p2", value = "参数2", paramType = "query")
	})
	@GetMapping("/demo")
	public JsonResult<SysUserRoleLk> demoGet(@NotEmpty(message = "p1不能为空") String p1, @NotEmpty(message = "p2不能为空") String p2) {

        return result.success("success");
    }

	/**
	 * @author: ares
	 * @date: 2021-10-08 12:06:48
	 * @description: demo post
	 * @param entity
	 * @return JsonResult
	 */
	@ApiOperation("demo POST")
	@PostMapping("/demo")
	public JsonResult demoPost(@RequestBody @Valid SysUserRoleLk entity){

        return result.success("success");
	}
 }
